<!DOCTYPE html>
<title>Hit testing an empty container should not crash.</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
    * {
        margin: 0;
    }
    svg {
        pointer-events: bounding-box;
    }
</style>
<svg id="svg" width="200" height="200">
    <g></g>
</svg>
<script>
    test(function() {
        var checkOrigin = document.elementFromPoint(0, 0);
        assert_equals(checkOrigin, svg, "element @ 0, 0");

        var checkPoint = document.elementFromPoint(50, 50);
        assert_equals(checkPoint, svg, "element @ 50, 50");
    });
</script>
